// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

using System;
using System.Threading;
using System.Threading.Tasks;

#nullable restore
namespace Elastic.Clients.Elasticsearch.License
{
	public class LicenseNamespace : NamespacedClientProxy
	{
		internal LicenseNamespace(ElasticsearchClient client) : base(client)
		{
		}

		public DeleteLicenseResponse Delete(DeleteLicenseRequest request)
		{
			request.BeforeRequest();
			return DoRequest<DeleteLicenseRequest, DeleteLicenseResponse>(request);
		}

		public Task<DeleteLicenseResponse> DeleteAsync(DeleteLicenseRequest request, CancellationToken cancellationToken = default)
		{
			request.BeforeRequest();
			return DoRequestAsync<DeleteLicenseRequest, DeleteLicenseResponse>(request, cancellationToken);
		}

		public DeleteLicenseResponse Delete()
		{
			var descriptor = new DeleteLicenseRequestDescriptor();
			descriptor.BeforeRequest();
			return DoRequest<DeleteLicenseRequestDescriptor, DeleteLicenseResponse>(descriptor);
		}

		public DeleteLicenseResponse Delete(Action<DeleteLicenseRequestDescriptor> configureRequest)
		{
			var descriptor = new DeleteLicenseRequestDescriptor();
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequest<DeleteLicenseRequestDescriptor, DeleteLicenseResponse>(descriptor);
		}

		public Task<DeleteLicenseResponse> DeleteAsync(CancellationToken cancellationToken = default)
		{
			var descriptor = new DeleteLicenseRequestDescriptor();
			descriptor.BeforeRequest();
			return DoRequestAsync<DeleteLicenseRequestDescriptor, DeleteLicenseResponse>(descriptor);
		}

		public Task<DeleteLicenseResponse> DeleteAsync(Action<DeleteLicenseRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
		{
			var descriptor = new DeleteLicenseRequestDescriptor();
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequestAsync<DeleteLicenseRequestDescriptor, DeleteLicenseResponse>(descriptor);
		}

		public GetLicenseResponse Get(GetLicenseRequest request)
		{
			request.BeforeRequest();
			return DoRequest<GetLicenseRequest, GetLicenseResponse>(request);
		}

		public Task<GetLicenseResponse> GetAsync(GetLicenseRequest request, CancellationToken cancellationToken = default)
		{
			request.BeforeRequest();
			return DoRequestAsync<GetLicenseRequest, GetLicenseResponse>(request, cancellationToken);
		}

		public GetLicenseResponse Get()
		{
			var descriptor = new GetLicenseRequestDescriptor();
			descriptor.BeforeRequest();
			return DoRequest<GetLicenseRequestDescriptor, GetLicenseResponse>(descriptor);
		}

		public GetLicenseResponse Get(Action<GetLicenseRequestDescriptor> configureRequest)
		{
			var descriptor = new GetLicenseRequestDescriptor();
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequest<GetLicenseRequestDescriptor, GetLicenseResponse>(descriptor);
		}

		public Task<GetLicenseResponse> GetAsync(CancellationToken cancellationToken = default)
		{
			var descriptor = new GetLicenseRequestDescriptor();
			descriptor.BeforeRequest();
			return DoRequestAsync<GetLicenseRequestDescriptor, GetLicenseResponse>(descriptor);
		}

		public Task<GetLicenseResponse> GetAsync(Action<GetLicenseRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
		{
			var descriptor = new GetLicenseRequestDescriptor();
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequestAsync<GetLicenseRequestDescriptor, GetLicenseResponse>(descriptor);
		}

		public LicenseGetBasicStatusResponse GetBasicStatus(LicenseGetBasicStatusRequest request)
		{
			request.BeforeRequest();
			return DoRequest<LicenseGetBasicStatusRequest, LicenseGetBasicStatusResponse>(request);
		}

		public Task<LicenseGetBasicStatusResponse> GetBasicStatusAsync(LicenseGetBasicStatusRequest request, CancellationToken cancellationToken = default)
		{
			request.BeforeRequest();
			return DoRequestAsync<LicenseGetBasicStatusRequest, LicenseGetBasicStatusResponse>(request, cancellationToken);
		}

		public LicenseGetBasicStatusResponse GetBasicStatus()
		{
			var descriptor = new LicenseGetBasicStatusRequestDescriptor();
			descriptor.BeforeRequest();
			return DoRequest<LicenseGetBasicStatusRequestDescriptor, LicenseGetBasicStatusResponse>(descriptor);
		}

		public LicenseGetBasicStatusResponse GetBasicStatus(Action<LicenseGetBasicStatusRequestDescriptor> configureRequest)
		{
			var descriptor = new LicenseGetBasicStatusRequestDescriptor();
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequest<LicenseGetBasicStatusRequestDescriptor, LicenseGetBasicStatusResponse>(descriptor);
		}

		public Task<LicenseGetBasicStatusResponse> GetBasicStatusAsync(CancellationToken cancellationToken = default)
		{
			var descriptor = new LicenseGetBasicStatusRequestDescriptor();
			descriptor.BeforeRequest();
			return DoRequestAsync<LicenseGetBasicStatusRequestDescriptor, LicenseGetBasicStatusResponse>(descriptor);
		}

		public Task<LicenseGetBasicStatusResponse> GetBasicStatusAsync(Action<LicenseGetBasicStatusRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
		{
			var descriptor = new LicenseGetBasicStatusRequestDescriptor();
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequestAsync<LicenseGetBasicStatusRequestDescriptor, LicenseGetBasicStatusResponse>(descriptor);
		}

		public LicenseGetTrialStatusResponse GetTrialStatus(LicenseGetTrialStatusRequest request)
		{
			request.BeforeRequest();
			return DoRequest<LicenseGetTrialStatusRequest, LicenseGetTrialStatusResponse>(request);
		}

		public Task<LicenseGetTrialStatusResponse> GetTrialStatusAsync(LicenseGetTrialStatusRequest request, CancellationToken cancellationToken = default)
		{
			request.BeforeRequest();
			return DoRequestAsync<LicenseGetTrialStatusRequest, LicenseGetTrialStatusResponse>(request, cancellationToken);
		}

		public LicenseGetTrialStatusResponse GetTrialStatus()
		{
			var descriptor = new LicenseGetTrialStatusRequestDescriptor();
			descriptor.BeforeRequest();
			return DoRequest<LicenseGetTrialStatusRequestDescriptor, LicenseGetTrialStatusResponse>(descriptor);
		}

		public LicenseGetTrialStatusResponse GetTrialStatus(Action<LicenseGetTrialStatusRequestDescriptor> configureRequest)
		{
			var descriptor = new LicenseGetTrialStatusRequestDescriptor();
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequest<LicenseGetTrialStatusRequestDescriptor, LicenseGetTrialStatusResponse>(descriptor);
		}

		public Task<LicenseGetTrialStatusResponse> GetTrialStatusAsync(CancellationToken cancellationToken = default)
		{
			var descriptor = new LicenseGetTrialStatusRequestDescriptor();
			descriptor.BeforeRequest();
			return DoRequestAsync<LicenseGetTrialStatusRequestDescriptor, LicenseGetTrialStatusResponse>(descriptor);
		}

		public Task<LicenseGetTrialStatusResponse> GetTrialStatusAsync(Action<LicenseGetTrialStatusRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
		{
			var descriptor = new LicenseGetTrialStatusRequestDescriptor();
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequestAsync<LicenseGetTrialStatusRequestDescriptor, LicenseGetTrialStatusResponse>(descriptor);
		}

		public LicensePostResponse Post(LicensePostRequest request)
		{
			request.BeforeRequest();
			return DoRequest<LicensePostRequest, LicensePostResponse>(request);
		}

		public Task<LicensePostResponse> PostAsync(LicensePostRequest request, CancellationToken cancellationToken = default)
		{
			request.BeforeRequest();
			return DoRequestAsync<LicensePostRequest, LicensePostResponse>(request, cancellationToken);
		}

		public LicensePostResponse Post()
		{
			var descriptor = new LicensePostRequestDescriptor();
			descriptor.BeforeRequest();
			return DoRequest<LicensePostRequestDescriptor, LicensePostResponse>(descriptor);
		}

		public LicensePostResponse Post(Action<LicensePostRequestDescriptor> configureRequest)
		{
			var descriptor = new LicensePostRequestDescriptor();
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequest<LicensePostRequestDescriptor, LicensePostResponse>(descriptor);
		}

		public Task<LicensePostResponse> PostAsync(CancellationToken cancellationToken = default)
		{
			var descriptor = new LicensePostRequestDescriptor();
			descriptor.BeforeRequest();
			return DoRequestAsync<LicensePostRequestDescriptor, LicensePostResponse>(descriptor);
		}

		public Task<LicensePostResponse> PostAsync(Action<LicensePostRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
		{
			var descriptor = new LicensePostRequestDescriptor();
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequestAsync<LicensePostRequestDescriptor, LicensePostResponse>(descriptor);
		}

		public LicensePostStartBasicResponse PostStartBasic(LicensePostStartBasicRequest request)
		{
			request.BeforeRequest();
			return DoRequest<LicensePostStartBasicRequest, LicensePostStartBasicResponse>(request);
		}

		public Task<LicensePostStartBasicResponse> PostStartBasicAsync(LicensePostStartBasicRequest request, CancellationToken cancellationToken = default)
		{
			request.BeforeRequest();
			return DoRequestAsync<LicensePostStartBasicRequest, LicensePostStartBasicResponse>(request, cancellationToken);
		}

		public LicensePostStartBasicResponse PostStartBasic()
		{
			var descriptor = new LicensePostStartBasicRequestDescriptor();
			descriptor.BeforeRequest();
			return DoRequest<LicensePostStartBasicRequestDescriptor, LicensePostStartBasicResponse>(descriptor);
		}

		public LicensePostStartBasicResponse PostStartBasic(Action<LicensePostStartBasicRequestDescriptor> configureRequest)
		{
			var descriptor = new LicensePostStartBasicRequestDescriptor();
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequest<LicensePostStartBasicRequestDescriptor, LicensePostStartBasicResponse>(descriptor);
		}

		public Task<LicensePostStartBasicResponse> PostStartBasicAsync(CancellationToken cancellationToken = default)
		{
			var descriptor = new LicensePostStartBasicRequestDescriptor();
			descriptor.BeforeRequest();
			return DoRequestAsync<LicensePostStartBasicRequestDescriptor, LicensePostStartBasicResponse>(descriptor);
		}

		public Task<LicensePostStartBasicResponse> PostStartBasicAsync(Action<LicensePostStartBasicRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
		{
			var descriptor = new LicensePostStartBasicRequestDescriptor();
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequestAsync<LicensePostStartBasicRequestDescriptor, LicensePostStartBasicResponse>(descriptor);
		}

		public LicensePostStartTrialResponse PostStartTrial(LicensePostStartTrialRequest request)
		{
			request.BeforeRequest();
			return DoRequest<LicensePostStartTrialRequest, LicensePostStartTrialResponse>(request);
		}

		public Task<LicensePostStartTrialResponse> PostStartTrialAsync(LicensePostStartTrialRequest request, CancellationToken cancellationToken = default)
		{
			request.BeforeRequest();
			return DoRequestAsync<LicensePostStartTrialRequest, LicensePostStartTrialResponse>(request, cancellationToken);
		}

		public LicensePostStartTrialResponse PostStartTrial()
		{
			var descriptor = new LicensePostStartTrialRequestDescriptor();
			descriptor.BeforeRequest();
			return DoRequest<LicensePostStartTrialRequestDescriptor, LicensePostStartTrialResponse>(descriptor);
		}

		public LicensePostStartTrialResponse PostStartTrial(Action<LicensePostStartTrialRequestDescriptor> configureRequest)
		{
			var descriptor = new LicensePostStartTrialRequestDescriptor();
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequest<LicensePostStartTrialRequestDescriptor, LicensePostStartTrialResponse>(descriptor);
		}

		public Task<LicensePostStartTrialResponse> PostStartTrialAsync(CancellationToken cancellationToken = default)
		{
			var descriptor = new LicensePostStartTrialRequestDescriptor();
			descriptor.BeforeRequest();
			return DoRequestAsync<LicensePostStartTrialRequestDescriptor, LicensePostStartTrialResponse>(descriptor);
		}

		public Task<LicensePostStartTrialResponse> PostStartTrialAsync(Action<LicensePostStartTrialRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
		{
			var descriptor = new LicensePostStartTrialRequestDescriptor();
			configureRequest?.Invoke(descriptor);
			descriptor.BeforeRequest();
			return DoRequestAsync<LicensePostStartTrialRequestDescriptor, LicensePostStartTrialResponse>(descriptor);
		}
	}
}